package top.mczhengyi.xyblog.entity;

public enum ResultCode {
    // 1-5000 账户错误
    OK(0, "操作成功"),
    UNKNOWN_FAIL(-1, "未知错误"),
    NO_AUTH(1, "未授权操作"),
    NOT_USER(2, "不存在的用户"),
    WRONG_PWD(3, "错误的密码"),
    // 5001-9999 常规错误
    REQUIRE_PARAM(5001, "参数不完整"),
    // 10000-19999 博客处理错误
    NOT_FIND_BLOG(10000, "未找到文章");

    private Integer code;
    private String message;
    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
